package com.iqiyi.pps.epg.core.model.program;


/**
 * Created by karkarrotxu on 2017/3/2.
 */

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "program_director")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class ProgramDirector {
    public static final int READY_PLAY = 0;
    public static final int START_PLAY = 1;
    public static final int STOP_PLAY = 2;  //导播停止,定时回收节目已结束的导播
    public static final int TERMINATE_PLAY = 3; //导播结束,手动回收导播台
    public static final int DELETE_FLAG = -1;
    /** 实体版本标识*/
    private int version = 0;
    private int id;
    private long programQipuId;
    private String programName;
    private Timestamp startPlayTime;
    private Timestamp stopPlayTime;
    private int source;
    private int delay;
    private String outputUrl;
    private String recycleUrl;
    private String outputPreviewUrl;
    private String outputStreamType;
    private int playStatus;
    private int resourceId;
    private Timestamp addTime;
    private Timestamp updateTime;
    private int mainResourceId;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "program_qipu_id")
    public long getProgramQipuId() {
        return programQipuId;
    }

    public void setProgramQipuId(long programQipuId) {
        this.programQipuId = programQipuId;
    }
    @Column(name = "program_name")
    public String getProgramName() {
        return programName;
    }

    public void setProgramName(String programName) {
        this.programName = programName;
    }
    @Column(name = "start_play_time")
    public Timestamp getStartPlayTime() {
        return startPlayTime;
    }

    public void setStartPlayTime(Timestamp startPlayTime) {
        this.startPlayTime = startPlayTime;
    }
    @Column(name = "stop_play_time")
    public Timestamp getStopPlayTime() {
        return stopPlayTime;
    }

    public void setStopPlayTime(Timestamp stopPlayTime) {
        this.stopPlayTime = stopPlayTime;
    }
    @Column(name = "source")
    public int getSource() {
        return source;
    }

    public void setSource(int source) {
        this.source = source;
    }
    @Column(name = "delay")
    public int getDelay() {
        return delay;
    }

    public void setDelay(int delay) {
        this.delay = delay;
    }
    @Column(name = "output_url")
    public String getOutputUrl() {
        return outputUrl;
    }

    public void setOutputUrl(String outputUrl) {
        this.outputUrl = outputUrl;
    }

    @Column(name = "recycle_url")
    public String getRecycleUrl() {
        return recycleUrl;
    }

    public void setRecycleUrl(String recycleUrl) {
        this.recycleUrl = recycleUrl;
    }


    @Column(name = "output_preview_url")
    public String getOutputPreviewUrl() {
        return outputPreviewUrl;
    }

    public void setOutputPreviewUrl(String outputPreviewUrl) {
        this.outputPreviewUrl = outputPreviewUrl;
    }

    @Column(name = "output_stream_type")
    public String getOutputStreamType() {
        return outputStreamType;
    }

    public void setOutputStreamType(String outputStreamType) {
        this.outputStreamType = outputStreamType;
    }

    @Column(name = "play_status")
    public int getPlayStatus() {
        return playStatus;
    }

    public void setPlayStatus(int playStatus) {
        this.playStatus = playStatus;
    }

    @Column(name = "add_time")
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Column(name = "update_time", insertable = false, updatable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }


    @Column(name = "resource_id" , updatable = false)
    public int getResourceId() {
        return resourceId;
    }

    public void setResourceId(int resourceId) {
        this.resourceId = resourceId;
    }

    @Version
    @Column(nullable = false)
    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Column(name = "main_resource_id", updatable = false)
    public int getMainResourceId() {
        return mainResourceId;
    }

    public void setMainResourceId(int mainResourceId) {
        this.mainResourceId = mainResourceId;
    }
}
